package com.chen.androidstudy.activity;

/**
 * @Author: CHong
 * @CreateDate: 2024/6/13 0013
 * @Description:
 */

import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;

import com.chen.androidstudy.R;

/**
 * 动态代理实现事件注入(原理)
 */
public class ProxySecordActivity extends AppCompatActivity {

    public Button bt;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_proxy);
        bt = (Button) findViewById(R.id.bt);
        bt.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(ProxySecordActivity.this, "click", Toast.LENGTH_SHORT).show();
            }
        });
    }

    public void onTakePhoto(){
        Log.e("chen","-----onTakePhoto----");
    }
}
